<?php
require_once('dbConn.php');//require_once引入其他文件
//连接数据库
connect();
//用户id是通过GET方法提交
$cid = $_GET['cid'];//删除的话找ID，而为什么找是因为删除按钮调的是id
$sql = "select * from comments where cid = {$cid}";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$sql = "delete from comments where cid = {$cid}";
$result = mysql_query($sql) or die ('删除失败!'.mysql_error());
$num = mysql_query($sql);
if ($num != 1){
		echo "删除失败，2秒后返回视频信息页<br/>";
		header("refresh:2;url='message.php'");
	}else{
		echo "删除成功,2秒后返回视频信息页";
		header("refresh:2;url='message.php'");
	}
?>